package com.ql.gamelogm.service;

import com.ql.gamelogm.entities.Mail;
import org.springframework.data.domain.Page;

import java.util.List;

public interface MailService  {



    /**
     *
     * @param to 收件人
     * @param subject 主题
     * @param content 内容
     */
    boolean SendMail(String to ,String subject ,String content);

    void SaveMailSended(Mail mail);
    void SaveMailInBox(Mail mail);
    boolean SaveMailDeleted(Mail mail);
    void updateMailState(int id);
    int DeleteMailInBoxById(int id);
    int DeleteMailSendedById(int id);
    List<Mail> findAllMailsInBox();

    List<Mail> findAllMailsSended();

    List<Mail> findAllMailsDeleted();

    List<Mail> findMailInBoxById(int id);
    List<Mail> findMailSendedById(int id);
    List<Mail> findMailDeletedById(int id);


    List<Mail> findAllMailsInBoxBySendTo(String sendto);
    List<Mail> findAllMailsDeletedBySendTo(String sendto);


    Page<Mail> getMailsInBoxList(int pageNum, int pageSize) throws Exception;

    Page<Mail> getMailsSendedList(int pageNum, int pageSize);

    Page<Mail> getMailsDeletedList(int pageNum, int pageSize);

}
